<template>
<div>
    <!-- 面包屑导航区域 -->
    <el-breadcrumb>
        <el-breadcrumb-item :to="{ path: '/home' }">首页</el-breadcrumb-item>
        <el-breadcrumb-item>权限管理</el-breadcrumb-item>
        <el-breadcrumb-item>权限角色</el-breadcrumb-item>
    </el-breadcrumb>
    <!-- 卡片视图 -->
    <el-card>
        <el-row>
            <el-col>
                <el-button type="primary">添加角色</el-button>
            </el-col>
        </el-row>
        <el-table :data="rolesList" stripe border>
            <!-- 展开列 -->
            <el-table-column type="expand"></el-table-column>
            <!-- 索引列 -->
            <el-table-column label="#" type="index"></el-table-column>
            <el-table-column label="角色名称" prop="roleName"></el-table-column>
            <el-table-column label="角色描述" prop="roleDesc"></el-table-column>
            <el-table-column label="操作" prop="operation">
                <templates>
                <!-- 修改按钮 -->
                <el-button type="primary" icon="el-icon-edit" size="mini">编辑</el-button>
                <!-- 删除按钮 -->
                <el-button type="danger" icon="el-icon-edit" size="mini" >删除</el-button>
                <!-- 分配角色按钮 -->
                <el-tooltip effect="dark" content="分配权限" placement="top">
                    <el-button type="warning" icon="el-icon-edit" size="mini"></el-button>
                </el-tooltip>
            </templates>
            </el-table-column>
            
        </el-table>
    </el-card>

</div>
</template>

<script>
export default {
    name: 'Roles',
    data() {
        return {
            rolesList: [
                { roleName: '小王', roleDesc: '1', operation: '0' },
                { roleName: '小张', roleDesc: '3', operation: '1' },
            ]
        }
    }
}
</script>

<style scoped>
.el-breadcrumb {
    padding: 10px 10px;
    font-size: 16px;
}
</style>
